<!--
*Author：DGZ
 *Contact：jiduxiong@dagongzao.com
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *业务请在@/extension/basproject/barcode/Bas_BarcodeRuleDetail.jsx此处编写
 -->
<template>
    <view-grid ref="grid" :columns="columns" :detail="detail" :details="details" :editFormFields="editFormFields"
        :editFormOptions="editFormOptions" :searchFormFields="searchFormFields" :searchFormOptions="searchFormOptions"
        :table="table" :extend="extend">
    </view-grid>

</template>
<script>
import extend from "@/extension/basproject/barcode/Bas_BarcodeRuleDetail.jsx";
import { ref, defineComponent } from "vue";
export default defineComponent({
    name:'Bas_BarcodeRuleDetail',
    setup() {
        const table = ref({
            key: "BarcodeRuleDetailId",
            footer: "Foots",
            cnName: "条码规则明细",
            name: "barcode/Bas_BarcodeRuleDetail",
            newTabEdit: false,
            url: "/Bas_BarcodeRuleDetail/",
            sortName: "BarcodeRuleDetailId"
        });
        const editFormFields = ref({ "BarcodeElementId": "", "FieldValue": "", "Length": "", "FieldStartValue": "", "ResetFlag": "", "ResetStartValue": "", "Remarks": "" });
        const editFormOptions = ref([[{ "dataKey": "BASE_BarcodeElement", "data": [], "title": "条码要素", "required": true, "field": "BarcodeElementId", "colSize": 12, "type": "select" }],
        [{ "title": "区段值", "field": "FieldValue" },
        { "title": "区段长度", "field": "Length", "type": "number" }],
        [{ "title": "起始值", "field": "FieldStartValue" },
        { "dataKey": "enabled", "data": [], "title": "是否为重置条件", "field": "ResetFlag", "type": "switch" }],
        [{ "title": "重置值", "field": "ResetStartValue" }],
        [{ "title": "备注", "field": "Remarks", "colSize": 12, "type": "textarea" }]]);
        const searchFormFields = ref({});
        const searchFormOptions = ref([]);
        const columns = ref([{ field: "BarcodeRuleDetailId", title: "ID", type: "bigint", width: 110, hidden: true, readonly: true, require: true, showOverflowTooltip: true, align: "left" },
        { field: "BarcodeRuleId", title: "条码规则ID", type: "bigint", width: 110, hidden: true, showOverflowTooltip: true, align: "left" },
        { field: "BarcodeElementId", title: "条码要素", type: "bigint", bind: { key: "BASE_BarcodeElement", data: [] }, width: 110, require: true, showOverflowTooltip: true, align: "left" },
        { field: "FieldValue", title: "区段值", type: "string", width: 180, showOverflowTooltip: true, align: "left" },
        { field: "Length", title: "区段长度", type: "int", width: 110, showOverflowTooltip: true, align: "left" },
        { field: "FieldStartValue", title: "起始值", type: "string", width: 180, showOverflowTooltip: true, align: "left" },
        { field: "ResetFlag", title: "是否为重置条件", type: "int", bind: { key: "enabled", data: [] }, width: 110, showOverflowTooltip: true, align: "left" },
        { field: "ResetStartValue", title: "重置值", type: "string", width: 180, showOverflowTooltip: true, align: "left" },
        { field: "IsValid", title: "是否有效", type: "int", width: 110, hidden: true, showOverflowTooltip: true, align: "left" },
        { field: "CreateId", title: "创建用户", type: "bigint", width: 80, hidden: true, showOverflowTooltip: true, align: "left" },
        { field: "Creator", title: "创建人", type: "string", width: 100, showOverflowTooltip: true, align: "left" },
        { field: "CreateTime", title: "创建时间", type: "datetime", width: 110, showOverflowTooltip: true, align: "left" },
        { field: "ModifyId", title: "修改用户", type: "bigint", width: 80, hidden: true, showOverflowTooltip: true, align: "left" },
        { field: "Modifier", title: "修改人", type: "string", width: 100, showOverflowTooltip: true, align: "left" },
        { field: "ModifyTime", title: "修改时间", type: "datetime", width: 110, showOverflowTooltip: true, align: "left" },
        { field: "Remarks", title: "备注", type: "string", width: 150, showOverflowTooltip: true, align: "left" }]);
        const detail = ref({ columns: [] });
        const details = ref([]);
        return {
            table,
            extend,
            editFormFields,
            editFormOptions,
            searchFormFields,
            searchFormOptions,
            columns,
            detail,
            details
        };
    },
});
</script>
